class SBMailer < ActionMailer::Base

  def invitation(subject,mail,fm)
    @subject      = '来自您的朋友'+subject+"的邀请"
    @body["name"] = subject
    @recipients   = mail
    @from         = fm
    @content_type = 'text/html'            
  end
  
  def self.checkaddress(mail)
    email=mail[:name]+"@"+mail[:address] if mail
    unless email=~/.+@.+\.(com|net|org)/
      return false
    else
      return email
    end
  rescue
    return false
  end
  
end
